package com.anpy.management.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 项目实体类
 */
@Data
@TableName(value = "T_PROJECT")
@ApiModel(description = "项目信息")
public class ProjectEntity {

    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户ID", example = "1")
    private Long userId;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "项目ID", example = "1")
    private Integer id;

    @TableField(value = "project_name")
    @ApiModelProperty(value = "项目名称", example = "个人管理系统")
    private String projectName;

    @TableField(value = "project_desc")
    @ApiModelProperty(value = "项目说明", example = "一个用于个人管理的系统")
    private String projectDesc;

    @TableField(value = "project_type")
    @ApiModelProperty(value = "项目类型", example = "PERSONAL")
    private String projectType;

    @TableField(value = "language_type")
    @ApiModelProperty(value = "语言类型", example = "JAVA")
    private String techCategory;

    @TableField(value = "project_status")
    @ApiModelProperty(value = "项目状态", example = "DEVELOPING")
    private String projectStatus;

    @TableField(value = "created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", example = "2025-02-27 15:00:00")
    private Date createdAt;

    @TableField(value = "updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", example = "2025-02-27 15:00:00")
    private Date updatedAt;
    private String projectDoc;
}
